package controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import services.RoleService;

import javax.annotation.Resource;

@Controller
@RequestMapping("/role")
public class RoleController {
    @Resource
    private RoleService roleService;

    /**
     * 获取所有角色
     * @return
     */
    @RequestMapping("/allRole.action")
    @ResponseBody
    public Object findAllRole(){
        return roleService.getAll();
    }

}
